<template>
  <div>
     <div class="picks">
              
            <div class="pickList" @click="btnClick(item)" v-for="(item,index) in pickList" :key="index">
             <div> 
           <!-- <img style="width: 100%;text-align: center;" :src="item.url"></div> -->
            <div class="title" >{{ item.pickTitle}}</div>
            <div class="time" >{{ item.createTime}}</div>
            <van-divider />
            </div>
</div>
</div>
  </div>
</template>
<script>
import { listPick, listPickClick, updatePickClick } from '@/api/pick'
  export default {
    data(){
             return {
      // 总条数
      total: 0,
      // 活动表格数据
      pickList: [],
      pickListClick: [],
      queryParams: {
        pageNum: 1,
        pageSize: 20,
        pickTitle: undefined,
        createBy: undefined,
        status: '0'
      }
    }

    },
   computed: {
    key() {
      return this.$route.path
    }
  },
  created() {
  },
   mounted() {
    this.getPickList()
  },
  methods: {
      /** 查询活动列表 */
    getPickList() {
      listPick(this.queryParams).then(response => {
        this.pickList = response.rows
        this.total = response.total
      })
      listPickClick(this.queryParams).then(res => {
        this.pickListClick = res.rows
      })
    },

    //点击选中
    btnClick(data) {
      updatePickClick(data)
      this.$router.push({
        path: './pickdetail/main',
        query: {
          id: data.pickId
        }
      })
  }
  }

}

</script>
<style scoped>
.news{
  background-color: rgb(255, 255, 255);
  width: 95%;
  margin: 20rpx 20rpx 15rpx;
  -moz-box-shadow:2rpx 2rpx 5rpx #969696;
  -webkit-box-shadow:2rpx 2rpx 5rpx #838080;
  box-shadow:2rpx 2rpx 5rpx #969696;
  display:flex;
	padding:0 0px;
	flex-wrap:wrap;
  border-radius: 5px;
}
.newsList{
  width: 95%;
   font-size: 12pt;
    padding: 20rpx;
}
.title{
  color: #070707;
}
.time{
   text-align: right;
   color: #35353598;
   font-size: 10pt;
}
</style>